﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.QualityTools.Testing.Fakes;
using System.Fakes;
using SystemUnderTest;

namespace UnitTestProject1
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void ThisTestAlsoUsesTheSharedFakes()
        {
            using (ShimsContext.Create())
            {
                ShimDateTime.NowGet = () => new DateTime(2012, 1, 1);

                var result = Formatters.NowAsShortDate;

                Assert.AreEqual("1/1/2012", result);
            }
        }
    }
}
